package net.midnighttd.game.entity;

import net.midnighttd.engine.entity.Entity;
import net.midnighttd.engine.Engine;
import net.midnighttd.engine.view.sprite.SpriteManager;
import org.w3c.dom.Element;

/**
 * Author: Adam Scarr
 * Date: 22/04/2009
 * Time: 9:08:14 PM
 */
public class EntityFactory implements net.midnighttd.engine.entity.EntityFactory {
    public Entity createEntity(Engine engine, SpriteManager spriteManager, String entType, Element e) {
        if(entType.equals("unit")) {
            return new Unit(engine, spriteManager, e);
        } else if(entType.equals("tower")) {
            return new Tower(engine, spriteManager, e);
        } else if(entType.equals("upgrade")) {
            return new Tower(engine, spriteManager, e);
        }

        return null;
    }
}
